﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using DTO;
using DAO;
namespace BUS
{   
    public class LoaiMonAnBUS
    {
        LoaiMonAnDAO loaidao = new LoaiMonAnDAO();
        //lay danh sach loai mon an
        public List<LoaiMonAnDTO> LayDanhSachLoaiMonAn()
        {
            List<LoaiMonAnDTO> KQ = loaidao.LayDanhSachLoaiMonAn();
            return KQ;
        }
        public List<LoaiMonAnDTO> LayDanhSachLoaiMonAn(int ma)
        {
            List<LoaiMonAnDTO> KQ = loaidao.LayDanhSachLoaiMonAn(ma);
            return KQ;
        }
        //them loai mon an
        public int ThemLoaiMonAn(string TenLoai)
        {
            return loaidao.ThemLoaiMonAn(TenLoai);
        }
        //cap nhat loai mon an
        public int CapNhatLoaiMonAn(LoaiMonAnDTO mn)
        {
            return loaidao.CapNhatLoaiMonAn(mn);
        }
        //xoa loai mon an
        public int XoaLoaiMonAn(int ma)
        {
            return loaidao.XoaLoaiMonAn(ma);
        }
        //lay loai mon an
        public List<LoaiMonAnDTO> layloaimonan()
        {
            LoaiMonAnDAO ds = new LoaiMonAnDAO();
            List<LoaiMonAnDTO> kq = ds.layloaimonan();
            return kq;
        }
    }

}
